package com.kaili.basic.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.kaili.basic.pojo.dto.*;
import com.kaili.basic.pojo.entity.MdmGeofenceEntity;
import com.kaili.basic.pojo.entity.MdmRailEntity;
import com.kaili.basic.pojo.entity.MdmRailStrategyEntity;
import com.kaili.basic.pojo.entity.MdmTimefenceEntity;

import java.util.List;

/**
*  service接口
* @author:nigang
* @Time: 2019-07-24
* @Copyright: ©  杭州凯立通信有限公司 版权所有
* @Warning: 本内容仅限于公司内部传阅,禁止外泄或用于其它商业目的
*/
public interface IMdmRailService {
    //新增地理围栏
    int addGeofence(MdmGeofenceAddDto dto);

    //新增时间围栏
    int addTimefence(MdmTimefenceAddDto dto);

    //新增围栏策略
    int addRailStrategy(MdmRailStrategyEntity entity);

    //根据围栏id删除策略
    int deleteRailStrategy(Integer railId);

    //根据策略id删除围栏
    int deleteStrategyRail(Integer strategyId);

    //删除围栏
    int deleteRail(Integer id);

    //删除地理围栏
    int deleteGeofence(Integer id);

    //删除时间围栏
    int deleteTimefence(Integer id);

    //修改地理围栏
    int updateGeofence(MdmGeofenceUpdateDto dto);

    //修改时间围栏
    int updateTimefence(MdmTimefenceUpdateDto dto);

    //id查询地理围栏
    MdmGeofenceEntity queryGeofenceById(Integer id);

    //name查询地理围栏
    MdmGeofenceEntity queryGeofenceByName(String name);

    //查询所有地理围栏
    List<MdmGeofenceEntity> queryGeofenceAll();

    //id查询时间围栏
    MdmTimefenceEntity queryTimefenceById(Integer id) throws Exception;

    //name查询时间围栏
    MdmTimefenceEntity queryTimefenceByName(String name) throws Exception;

    //查询所有时间围栏
    List<MdmTimefenceEntity> queryTimefenceAll();

    //围栏id查询策略集合
    List<MdmRailStrategyEntity> getRailStrategyList(Integer id);

    //查询围栏的最大id
    Integer getMaxId();

    //分页查询围栏管理
    Page<MdmRailEntity> queryRail(Page<MdmRailEntity> page, MdmRailQueryDto dto);
}
